'use strict';

const routes = [
  {
    path: '/sms/addSms',
    module: 'sms',
    name: 'addSms'
  },
  {
    path: '/sms/querySms',
    module: 'sms',
    name: 'querySms'
  },
  {
    path: '/sms/queryAll',
    module: 'sms',
    name: 'queryAll'
  },
  {
    path: '/sms/queryByPage',
    module: 'sms',
    name: 'queryByPage'
  },
]
module.exports = app => {
  const { router, controller } = app;
  for (let item of routes) {
    console.log(item);
    router.get(item.path, controller[item.module][item.name]);
    router.post(item.path, controller[item.module][item.name]);
  }
};
